import 'package:flutter/material.dart';
import 'package:get/get.dart';

class OrderLogic extends GetxController with GetTickerProviderStateMixin {
  ///定义滑动监听类
  late ScrollController scrollController;

  ///false 代表没折叠  true代表折叠
  bool silverCollapsed = false;

  late TabController tabController;
  PageController pageController = PageController();

  List<String> titles = ["全部", "待付款", "待发货", "待收货", "已完成"];

  @override
  void onInit() {
    super.onInit();
    scrollController = ScrollController();

    scrollController.addListener(() {
      ///130 这个值根据下面的expandedHeight值自己调整 看效果可以就行
      if (scrollController.offset >= 130) {
        silverCollapsed = true;
      } else {
        silverCollapsed = false;
      }
    });

    tabController = TabController(length: 5, vsync: this);
  }

  @override
  void dispose() {
    // TODO: implement dispose
    tabController.dispose();
    super.dispose();
  }
}
